<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>考生管理-将考生加入考试</title>
    <th:block th:include="fragment_header :: header">
    </th:block>

</head>
<body>
<div th:replace="fragment_menu :: navmenu"></div>
<!--<h2 style="padding: 20px 100px">SONY</h2>-->
<ul style="background-color:  #DCDCDC;">
    <ul class="nav nav-tabs" style="padding:0px 100px" >
        <li class="nav-item " >
            <a class="nav-link active" href="#" th:href="@{/exam_student/students}">考生管理 </a>
        </li>
        <li class="nav-item dropdown ">
            <a class="nav-link dropdown-toggle text-black" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">考生添加 </a>
            <ul class="dropdown-menu" style="background-color: #DCDCDC;">
                <li><a class="dropdown-item"  th:href="@{/exam_student/add}">通过考生库添加 </a></li>
                <li><a class="dropdown-item"  th:href="@{/exam_student/find}">通过搜索员工号添加 </a></li>
<!--                <li><a class="dropdown-item"  th:href="@{/exam_student/input}">通过输入考生信息添加 </a></li>-->
            </ul>
        </li>
        <li class="nav-item">
            <a class="nav-link text-black" th:href="@{/exam_student/exam_select}">考试信息查询 </a>
        </li>
    </ul>
</ul>
<form action="#" th:action="@{/exam_student/find_add}" th:object="${studentModel}" method="post"
      class="form-horizontal">
    <div class="container mt-3">
        <h5 class="text-muted" style="padding: 10px 10px">请选择考试信息</h5>
        <div class="form-floating mb-3 mt-3">
            <select class="form-select " id="sel1" name="exam">
                <option th:each="examModel: ${examModels}" th:selected="${{param.exam}} eq ${examModel.id}"
                        th:value="${examModel.id}" th:text="'考试名称:'+${examModel.name}+'**考试日期:'+${examModel.examAt}+'**考试时长:'+${examModel.timeLimit}+'**考试总成绩:'+${examModel.totalScore}">考试信息
                </option>
            </select>
        </div>
    </div>
    <div class="container mt-3" style="padding: 50px 10px">
        <h5 class="text-muted" style="padding: 10px 10px">请确认考生信息</h5>
    </div>
    <div style="padding: 0px 100px 10px">
        <table class="table">
            <thead class="table-secondary">
            <tr>
                <!--            <th scope="col">#</th>-->
                <th scope="col">employeeNo</th>
                <th scope="col">name</th>
                <th scope="col">gender</th>
                <th scope="col">email</th>
                <th scope="col">mobile</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <!--            <th scope="row">1</th>-->
                <input th:field="*{id}" type="hidden" name="id"/>
                <input th:field="*{employeeNo}" type="hidden" name="employeeNo"/>
                <input th:field="*{name}" type="hidden" name="name"/>
                <input th:field="*{gender}" type="hidden" name="gender"/>
                <input th:field="*{email}" type="hidden" name="email"/>
                <input th:field="*{mobile}" type="hidden" name="mobile"/>
                <td th:text="${studentModel.employeeNo}">employeeNo</td>
                <!--            <td th:text="${student.employeeNo}" th:value="${student.employeeNo}" name="employeeNo">employeeNo</td>-->
                <td th:text="${studentModel.name}">name</td>
                <td th:text="${studentModel.gender}">gender</td>
                <td th:text="${studentModel.email}">email</td>
                <td th:text="${studentModel.mobile}">mobile</td>
            </tr>
            </tbody>
        </table>
        <div style="padding: 20px " class="d-flex align-items-center justify-content-center">
            <button type="submit" class="btn btn-primary" name="save">确认添加</button>
        </div>
    </div>
</form>
</body>
</html>